import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)


const routes = [
  {
    path: '/login',
    component: () => import("@/views/LoginView.vue")
  },
  {
    path: '/mainView',
    name: 'Main',
    component: () => import("@/views/MainView.vue"),
      children:[/* http://localhost:8081/#/mainView/emp */
      {
        path:'emp',
        component:()=>import('@/views/EmpView.vue')
      },
      // {
      //   path:'c/p2',
      //   component:()=>import('@/views/container/P2View.vue')
      // }
    ]
  },
  // {
  //   path: '/emp',
  //   name: 'User',
  //   component: () => import("@/views/EmpView.vue"),
  // },

  {
    path: '/404',
    component: () => import("@/views/NotFound.vue")
  },
  {
    path: '*',
    redirect: '/404'/* 重定向 */
  }
]

const router = new VueRouter({
  routes
})

export default router
